package com.class04;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

/**
 * @ClassDescription:
 * @JdkVersion: 17
 * @Author: yxy
 * @Created: ${DATE} ${TIME}
 */

@SpringBootApplication//启动类
//1.配置类 @SpringBootApplication
//2.自动加载配置
//@EnableAutoConfiguration 自动加载其他的配置类
//3.@ComponentScan 默认扫描是当前类所在的包及子包的注解
public class Main {
    //    1.创建ioc容器，加载配置
//    2.启动内置web服务器
    public static void main(String[] args) {
        SpringApplication.run(Main.class, args);//自动创建ioc容器，启动tomcat服务器软件
    }
    @Bean
    public Object object(){
        return new Object();
    }
}